package dao.article;

import domain.Article;
import domain.User;

import java.util.List;

public interface ArticleDao {
    /**
     * 新增文章
     * @param type
     * @param title
     * @param info
     * @param abs
     * @param change_time
     * @param author
     * @param state
     * @return int
     * @author 夏添
     * @date 2020/9/17 17:28
     */
    public int creatArticle(int type,String title,String info,String abs,String change_time,String author,int state) throws Exception;

    /**
     * 后台获取文章列表
     * @return List<Article>
     * @author 夏添
     * @date 2020/9/24 21:03
     */
    public List<Article> getArticleList() throws Exception;

    /**
     * 获取文章详情
     * @param id
     * @return Artlcle
     * @author 夏添
     * @date 2020/9/24 21:03
     */
    public Article getArticleInfo(int id) throws Exception;

    /**
     * 前台获取文章列表
     * @param type
     * @return List<Article>
     * @author 夏添
     * @date 2020/9/24 21:03
     */
    public List<Article> getNewsList(int type) throws Exception;

    /**
     * 编辑文章
     * @param id
     * @param type
     * @param title
     * @param info
     * @param abs
     * @param change_time
     * @param author
     * @param state
     * @return int
     * @author 夏添
     * @date 2020/9/17 17:28
     */
    public int changeArticle(int id,int type,String title,String info,String abs,String change_time,String author,int state) throws Exception;

    /**
     * 删除文章
     * @param id
     * @return int
     * @author 夏添
     * @date 2020/9/24 21:03
     */
    public int DeleteArticle(int id) throws Exception;

}
